package lesson4.test_suites;

import lesson4.api.base.TestSuiteBase;

import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;

public class SmokeTS extends TestSuiteBase
{
	@DataProvider
	public Object[][] regData()
	{
		return new Object[][]
		{
				{ "", "", "", "", "", "", "", "", "", false }, // incorrect data
				{ "testuser1111911", "111111", "Test", "User1", "testuser1111119@cupid.com", "testuser1.skype", "1111111111", "Test team", "Tester", true }, // correct
																																								// data
		};
	}

	@DataProvider
	public Object[][] loginData()
	{
		return new Object[][]
		{
				{ "", "", false }, // incorrect data
				{ "babar", "111111", true }, // correct data
		};
	}

	@Test(dataProvider = "regData", priority = 2, groups = "registration", enabled = true)
	public void registrationTest(String p_username, String p_password, String p_firstName, String p_lastName,
			String p_email, String p_skype, String p_phone, String p_department, String p_occupation, boolean p_expectedResult)
	{
		registrationPageTests().registrationTest(p_username, p_password, p_firstName, p_lastName, p_email, p_skype, p_phone, p_department, p_occupation,
				p_expectedResult);
	}

	@Test(dataProvider = "loginData", priority = 1, groups = "login", dependsOnGroups = "registration", enabled = true)
	public void loginTest(String p_username, String p_password, boolean p_expectedResult)
	{
		indexPageTests().loginTest(p_username, p_password, p_expectedResult);
	}
}
